
from asyncore import read
from PyQt5.uic import *
import PyQt5
from PyQt5 import QtWidgets
import numpy
import csv

# f = open(r'temp\dropTest\1.csv', 'r',encoding='UTF-8')
# reader = csv.reader(f)
# for row in reader:
#     label = row
# f.close()
import sys

# 作用是调用其他文件夹下的的 py 文件中的函数
sys.path.append(r"C:\Users\qh\Documents\giteeRepository\label-file\temp\dropTest\test2.py")

from test2 import readVar

label = readVar('test.pkl')

print(label)


class DropTest(QtWidgets.QMainWindow):
    def __init__(self) -> None:
        super(DropTest,self).__init__()
        loadUi(r'temp\dropTest\untitled.ui',self)
        self.setAcceptDrops(True)
        # self.textBrowser.setAcceptDrops(True)
    
    def dragEnterEvent(self, event):
        print("hello")
        self.textBrowser.setText("hello")

if __name__ == '__main__':
    import sys
    app = QtWidgets.QApplication(sys.argv)
    ap = DropTest()
    ap.show()
    sys.exit(app.exec_())